package artandco.dao;

import java.io.Serializable;
import java.util.List;

/**
 * 
 * GenericDao.java
 *
 * @version 1.0
 * @date 26 mai 2011 
 * @param <T>
 * @param <PK>
 */
public interface GenericDao<T, PK extends Serializable> {

	/**
	 * create
	 * 
	 * @param newInstance
	 */
	void create(T newInstance);

	/**
	 * read
	 * 
	 * @param id
	 * @return T
	 */
	T read(PK id);

	/**
	 * readAll
	 * 
	 * @return List<T>
	 */
	List<T> readAll();

	/**
	 * update
	 * 
	 * @param transientObject
	 */
	void update(T transientObject);

	/**
	 * delete
	 * 
	 * @param persistentObject
	 */
	void delete(T persistentObject);
}